package ywpt.service.config;

import java.util.List;

import ywpt.model.CommonTypes;

import org.hibernate.criterion.DetachedCriteria;

public interface CommonTypesService {

	public abstract CommonTypes getEntityById(Long id);

	public abstract void save(CommonTypes commonTypes);

	public abstract void update(CommonTypes commonTypes);

	public abstract void remove(Long id);

	public abstract List<CommonTypes> getEntitys();
	
	public abstract int getEntityCountByCriteria(DetachedCriteria query);

	@SuppressWarnings("unchecked")
	public abstract List<CommonTypes> getEntitys(DetachedCriteria query);

	@SuppressWarnings("unchecked")
	public abstract List<CommonTypes> getEntitys(DetachedCriteria query,
			int pageSize, int startIndex);
	
	public abstract List<CommonTypes> getEntitysByName(String name,
			int start, int size);
	
	public abstract int getEntitysCountByName(String name);
	
	public abstract String createCode(String prefixCode);
	
	public abstract List<CommonTypes> getCommonTypesByArea(String areaId);
}

